package com.meilai.project.constant;

import lombok.Getter;

@Getter
public enum BFContractTypeEnum {
    ORIGIN(1, "原始合同"),
    SUPPLY(2, "补充协议");

    private Integer id;
    private String name;


    BFContractTypeEnum(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public static BFContractTypeEnum getEnumById(Integer id) {
        for (BFContractTypeEnum cur : BFContractTypeEnum.values()) {
            if (cur.getId().equals(id)) {
                return cur;
            }
        }
        return null;
    }
}
